package com.ydgk.service;

import com.ydgk.bean.Provider;
import com.ydgk.dao.ProviderDao;

import java.util.List;

public class ProviderService {

    ProviderDao providerDao=new ProviderDao();

    public int deleteById(int pid){
        return providerDao.deleteById(pid);
    }

    public int add(Provider provider){
        return providerDao.save(provider);
    }

    public int updateById(Provider provider){
        return providerDao.updateById(provider);
    }

    public List<Provider> findAll(){
        return providerDao.findAll();
    }

    public int updatemoney(Provider provider,int money){
        return providerDao.updateMoney(provider,money);
    }

    public Provider findById(int id){
        return providerDao.findById(id);
    }

    public int maxPage(String table){
        return providerDao.maxPage(table);
    }

    public List<Provider> paging (int pageNumber){
        return providerDao.paging(pageNumber);
    }

    public int total(){return providerDao.total();}



}
